package cn.iocoder.yudao.module.happycore.dal.mysql.oxproject;

import java.util.*;

import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;

import cn.iocoder.yudao.module.happycore.controller.admin.oxproject.vo.OxProjectPageReqVO;
import cn.iocoder.yudao.module.happycore.dal.dataobject.oxproject.OxProjectDO;
import org.apache.ibatis.annotations.Mapper;


/**
 * 项目 Mapper
 *
 * @author 昂热
 */
@Mapper
public interface OxProjectMapper extends BaseMapperX<OxProjectDO> {

    default PageResult<OxProjectDO> selectPage(OxProjectPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<OxProjectDO>()
                .likeIfPresent(OxProjectDO::getProjectName, reqVO.getProjectName())
                .eqIfPresent(OxProjectDO::getProjectPath, reqVO.getProjectPath())
                .eqIfPresent(OxProjectDO::getRemark, reqVO.getRemark())
                .betweenIfPresent(OxProjectDO::getCreateTime, reqVO.getCreateTime())
                .orderByDesc(OxProjectDO::getId));
    }

}